package com.nondo.rdp.finance.domain.activity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.nondo.rdp.auth.domain.User;
import com.nondo.rdp.core.domain.base.BaseEntity;
import com.nondo.rdp.finance.config.DbConfig;

/**
 * 营销-领取记录
 */
@Entity
@Table(name = DbConfig.DEFAULT_TABLE_PREFIX + "market_record")
public class MarketRecord extends BaseEntity {
	
	private static final long serialVersionUID = -6566785702156093176L;
	
	private Long id;// 主键
	private int type;//类型 0|解套
    private User user;//用户

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(columnDefinition = "int default 0", length = 2)
	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	@OneToOne
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}
